/* ==================================================================   
 * Created [2009-4-27 下午11:32:55] by Jon.King 
 * ==================================================================  
 * TSS 
 * ================================================================== 
 * mailTo:jinpujun@hotmail.com
 * Copyright (c) Jon.King, 2009-2012 
 * ================================================================== 
 */

package com.jinhe.tss.cms;

/** 
 * CMS常用常量定义
 */
public class CMSConstants {
	
    /**
     * 发布流程控制：控制是否需要生成XML发布文件
     */
    public static final String PARAM_NAME_PUBLISHFLAG = "publishFlag";

    public static final String PUBLISH_ADD = "1"; // 增量发布
    public static final String PUBLISH_ALL = "2"; // 完全发布
    
    /**
     * 布尔型常量
     */
    public static final String BOOLEAN_TRUE  = "true";
    public static final String BOOLEAN_FALSE = "false";
    
    public static final Integer TRUE  = new Integer(1);
    public static final Integer FALSE = new Integer(0);
    
    public static final Integer STATUS_STOP  = TRUE;  // 站点停止状态
    public static final Integer STATUS_START = FALSE; // 站点启动状态
   
    /** 下载地址的路径 */
    public static final String DOWNLOAD_SERVLET_URL = "/download.fun?id="; 
    
    /** 根结点ID */
    public static final Long HEAD_NODE_ID = new Long(-1); 
    
    public static final String COPY_NAME_PREFIX = "副本_";   // 副本前缀

    public static final Integer SITE_DEFAULT_HOT_ARTICLE_RULE = new Integer(5); //站点默认的热门文章数
    public static final Integer SITE_DEFAULT_NEW_ARTICLE_RULE = new Integer(1); //站点默认新文章数
    public static final Integer SITE_DEFAULT_NO_RULE          = new Integer(0); //不设置Rule
    
    public static final Integer DEFAULT_HIT_COUNT = new Integer(0);	//默认点击率
    
    /*
     * 文章附件
     */
    public static final Integer ATTACHMENTTYPE_PICTURE = new Integer(1);	//文章附件图片类型
    public static final Integer ATTACHMENTTYPE_OFFICE  = new Integer(2);	//文章附件OFFICE类型

    //资源授权相关
    public static final String RESOURCE_TYPE_CHANNEL  = "21";   //资源类型  站点栏目
    public static final String RESOURCE_TYPE_WORKFLOW = "22";   //资源类型  工作流
    
    //栏目资源操作ID
    public static final String OPERATION_ADD_SITE    = "1"; // 新建站点
    public static final String OPERATION_ADD_CHANNEL = "2"; // 新建栏目
    public static final String OPERATION_ADD_ARTICLE = "3"; // 新建文章
    public static final String OPERATION_PUBLISH     = "4"; // 发布权限
    public static final String OPERATION_EDIT        = "5"; // 编辑权限
    public static final String OPERATION_DELETE      = "6"; // 删除权限
    public static final String OPERATION_STOP        = "7"; // 停用权限
    public static final String OPERATION_START       = "8"; // 启用权限
    public static final String OPERATION_COPY        = "9"; // 复制权限
    public static final String OPERATION_PASTE       = "10";// 复制到权限
    public static final String OPERATION_MOVE        = "11";// 移动权限
    public static final String OPERATION_VIEW        = "12";// 查看权限
    public static final String OPERATION_ORDER       = "13";// 排序权限
    public static final String OPERATION_BROWSE      = "14";// 浏览权限 
    public static final String DOWNLOAD_ATTACHMENT   = "23";// 下载附件
 
    /*
     * 文章种类
     */
    public static final Integer ARTICLE_COMMON     = 0; // 普通文章
    public static final Integer ARTICLE_DISTRIBUTE = 1; // 分发文章
    public static final Integer ARTICLE_RESHIP     = 2; // 转载文章
    public static final Integer ARTICLE_FROMTHIRD  = 3; // 第三方文章

    /**
     * 默认工作流ID，即文章工作流一
     */
    public static final Long DEFAULT_WORKFLOW_ID   = new Long(1);
    
    /*
     * 工作流默认流程状态
     */
    public static final Integer LOCKING_STATUS   = new Integer(0); // 锁定状态
    public static final Integer START_STATUS     = new Integer(1); // 起始状态
    public static final Integer EDITED_STATUS    = new Integer(2); // 已编辑
    public static final Integer CHECKED_STATUS   = new Integer(3); // 已审核
    public static final Integer TOPUBLISH_STATUS = new Integer(4); // 待发布状态
    public static final Integer OVER_STATUS      = new Integer(5); // 过期状态
    public static final Integer XML_STATUS       = new Integer(-1);// 已发布生成xml文件
    
    /*
     * 策略类型常量
     */
    public static final Integer TACTIC_TIME_TYPE    = new Integer(0); // 时间策略
    public static final Integer TACTIC_INDEX_TYPE   = new Integer(1); // 索引策略
    public static final Integer TACTIC_PUBLISH_TYPE = new Integer(2); // 发布策略
    public static final Integer TACTIC_EXPIRE_TYPE  = new Integer(3); // 文章过期策略
    
    /*
     * 动态属性模板常量
     */
    public static final String SITE_BASE_INFO_TAB_KEY    = "siteInfo";	  // 站点动态属性xform模板TAB名称
    public static final String CHANNEL_BASE_INFO_TAB_KEY = "channelInfo"; // 栏目动态属性xform模板TAB名称
    public static final String ARTICLE_TEMPLATE_TAB_NAME = "articleInfo"; // 文章动态属性xform模板TAB名称
    
    public static String XFORM_TEMPLATE_CODE = "baseXForm4Article"; // 文章录入表单
    public static String GRID_TEMPLATE_CODE  = "baseGrid4Article";  // 文章列表

    //XForm 模板
    public static final String XFORM_TEMPLATE_ARTICLETYPE      = "template/xform/ArticleType.xml";
    public static final String XFORM_TEMPLATE_ARTICLETYPEGROUP = "template/xform/ArticleTypeGroup.xml";   
    public static final String XFORM_TEMPLATE_ARTICLEUPLOAD    = "template/xform/ArticleUpload.xml";
    public static final String XFORM_TEMPLATE_CHANNEL          = "template/xform/Channel.xml";
    public static final String XFORM_TEMPLATE_ARTICLE_SOURCE   = "template/xform/ArticleSource.xml";
    public static final String XFORM_TEMPLATE_SEARCH_ARTICLE   = "template/xform/SearchArticle.xml";
    public static final String XFORM_TEMPLATE_TACTIC_INDEX     = "template/xform/TacticIndex.xml";
    public static final String XFORM_TEMPLATE_TACTIC_PUBLISH   = "template/xform/TacticPublish.xml";
    public static final String XFORM_TEMPLATE_EXPIRE_PUBLISH   = "template/xform/TacticExpire.xml";
    public static final String XFORM_TEMPLATE_TACTIC_TIME      = "template/xform/TacticTime.xml";
    
    public static final String XFORM_TEMPLATE_STATISTICS_SEARCH = "template/xform/StatisticsSearch.xml";
    public static final String XFORM_TEMPLATE_COMMENTS_SEARCH   = "template/xform/ArticleCommentsSearch.xml";
    
    public static final String XFORM_TEMPLATE_WORKFLOW         = "template/xform/WorkFlow.xml";
    public static final String XFORM_TEMPLATE_WORDS_FILTER     = "template/xform/ArticleWordsFilter.xml";
    
    //Grid 模板
    public static final String GRID_TEMPLATE_ARTICLELIST   = "template/grid/ArticleList.xml";
    public static final String TEMPLATE_ATTACHSLIST        = "template/grid/AttachsList.xml";
    public static final String GRID_TEMPLATE_SCORE_COUNT   = "template/grid/ScoreCountList.xml";
    public static final String GRID_TEMPLATE_SCORE_CHANNEL = "template/grid/ChannelScoreCountList.xml";
    public static final String GRID_TEMPLATE_ARTICLE_SCORE = "template/grid/ArticleScore.xml";
    public static final String GRID_TEMPLATE_CHANNEL_ARTICLE_SCORE = "template/grid/ChannelArticleScore.xml";
    public static final String GRID_TEMPLATE_RECYCLE       = "template/grid/RecycleList.xml";
    public static final String GRID_TEMPLATE_COMMENTS      = "template/grid/ArticleCommentsList.xml";
    
    //动态属性
    public static final String TEMPLATE_ARTICLE_PROPERTY = "template/dyninit/ArticleProperties.xml";
    
    //工作流
    public static final String WORKFLOW_TEMPLATE_PATH = "workflow/ArticleWorkFlows.xml";
}